package com.xiaoran.springbt02web.controller;

import com.xiaoran.springbt02web.bean.Persion;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;

@Controller
public class ResponseTestController {
    @ResponseBody
    @GetMapping("/test/person")
    public Persion getPersion(){
        Persion persion=new Persion();
        persion.setAge(28);
        persion.setBirth(new Date());
        persion.setUsername("小花");
        return persion;
    }

}
